/*
    GameView extends JPanel
        :This is the main game screen where the game board and all that is displayed.
        Attributes
        Methods
*/

//This is the GameView component
//This is actually just a house for the 3 major Game GUI components:
//  GameButtons, GameMenu, GameBoard

//import only the things we need
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;

public class GameView extends JPanel {
	
	//declare our subcomponents
	//  this should allow them to access each other
	//  this will be needed for GameMenu to tell GameBoard to change view
	//  or for GameButtons to tell GameBoard to show moves
	//I cannot figure out a reliable and easy way to allow them to access each other
	//  without making them static
	//nvm that, I setup a method control from that static context of UIController
	// that allows the main views and all their public sub-components to be accessed from anywhere in GUI
	public GameMenu gamemenu;
	public GameButtons gamebuttons;
	public GameBoard gameboard;
	
	//define constructor
	public GameView() {
		
		//call our ancestor
		super();
		
		//declare our temporary references to GameMenu, GameButtons, and GameBoard
		this.gamemenu = new GameMenu();
		this.gamebuttons = new GameButtons();
		this.gameboard = new GameBoard();
		
		//setup our layout
		//BorderLayout is silly usually but it might just work for this
		//  we can have the menu lay in the NORTH
		//  we can have the buttons lay in the WEST
		//  and we can have the board eat up any extra space in the CENTER
		this.setLayout(new BorderLayout());
		this.add(this.gamemenu, BorderLayout.NORTH);
		this.add(this.gamebuttons, BorderLayout.WEST);
		this.add(this.gameboard, BorderLayout.CENTER);
		
		//set a reasonable size to match the ratio of our splash image
		this.setPreferredSize(new Dimension(500, 375));
		
		//setup visibilities
		this.setVisible(true);
		this.setOpaque(true);
		
	}
	
	
}